//
//  ExcelItem.swift
//  ReportScan
//
//  Created by woniu on 2025/5/7.
//

import Foundation
import SwiftUI

class ExcelItem: NSObject {
    public var indexInCsv = 0
    public var data:[String] = []
    public var url = ""
    public var errorList:[ScanErrorEnum] = []
    public var disScan = false
    //扫码结果存放位置，从0开始
    public var scanResultIndex:Int?
    
}

enum ScanErrorEnum: String {
    case errorBaseInfo = "用户基本信息错误"
    case errorSignDoctor = "签名医生错误"
    case errorReprotTitle = "报告标题错误"
    case errorDownloadFail = "图片下载失败"
    
    public static func getErrorString(error:[ScanErrorEnum])->String{
        let str = error.map { type in
            return type.rawValue
        }.joined(separator: "/")
        return str
    }
}
